<template>
    <div class="bg">
        <nav-bar/>
        <van-pull-refresh v-model="isLoading" @refresh="onRefresh">
            <home-index ref="home"></home-index>
        </van-pull-refresh>
    </div>
</template>

<script>
    import HomeIndex from "@/views/plague/HomeIndex";
    import NavBar from "@/components/NavBar/index";
    export default {
        name: "index",
        components: {NavBar, HomeIndex},
        data() {
            return {
                isLoading: false
            }
        },
        methods: {
            onRefresh() {
                setTimeout(() => {
                    this.isLoading = false;
                    this.$refs.home.getData();
                }, 500);
            }
        }
    }
</script>

<style scoped>
.bg{
    background: #f5f5f5;
}
</style>
